package com.ssy.lingxi.order.model.vo.basic.response;

import com.ssy.lingxi.common.utils.DateTimeUtil;
import com.ssy.lingxi.order.model.constant.DeliveryOrderOuterStatusEnum;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 查询送货单列表时返回的VO
 * @author 万宁
 * @version 2.0.0
 * @date 2021-07-15
 */
@Getter
@Setter
public class DeliveryOrderQueryVO implements Serializable {

    private static final long serialVersionUID = -7465303533286285459L;

    public DeliveryOrderQueryVO() {
    }

    public DeliveryOrderQueryVO(Long id, String deliveryNo, String digest, LocalDateTime deliveryTime,String vendorMemberName, String buyerMemberName, LocalDateTime createTime, Integer outerStatus) {
        this.id = id;
        this.deliveryNo = deliveryNo;
        this.digest = digest;
        this.deliveryTime = DateTimeUtil.formatDate(deliveryTime);
        this.vendorMemberName = vendorMemberName;
        this.buyerMemberName = buyerMemberName;
        this.createTime = DateTimeUtil.formatMinuteTime(createTime);
        this.outerStatus = outerStatus;
        this.outerStatusName = DeliveryOrderOuterStatusEnum.getNameByCode(outerStatus);
    }

    /**
     * 送货单id
     */
    private Long id;

    /**
     * 送货单编号
     */
    private String deliveryNo;
    /**
     * 摘要
     */
    private String digest;

    /**
     * 送货日期
     */
    private String deliveryTime;

    /**
     * 供应会员名称
     */
    private String vendorMemberName;

    /**
     * 采购会员名称
     */
    private String buyerMemberName;

    /**
     * 创建时间
     */
    private String createTime;

    /**
     * 外部状态 1-已提交 2-已收货 3-已作废
     */
    private Integer outerStatus;
    /**
     * 外部状态名称
     */
    private String outerStatusName;

}
